{template "header.html"}

<div class="page-wrapper-row full-height">
    <div class="page-wrapper-middle">
        <div class="page-head">
            <div class="container">
                <div class="page-title">
                    欢迎使用迅睿CMS建站程序，移动端CMS程序、多终端CMS程序
                </div>
            </div>
        </div>
        <div class="page-content">
            <div class="container">
                <div class="page-content-inner">



                    <div class="row">
                        <div class="col-md-4">
                            <div class="bg-white">
                                <div id="myCarousel" class="carousel slide" data-ride="carousel">
                                    <!-- 幻灯图片 -->
                                    <div class="carousel-inner">
                                        <!-- 调用news模块的前5张图片 -->
                                        {module module=news thumb=1 num=5}
                                        <div class="item {if $key==0}active{/if}">
                                            <a href="{$t.url}" target="_blank"><img src="{dr_get_file($t.thumb)}" style="width:360px;height:245px" /></a>
                                        </div>
                                        {/module}
                                    </div>
                                    <ol class="carousel-indicators">
                                        <!-- 重复读取上面循环的变量，避免重复查询第二次 -->
                                        {loop $return $key $t}
                                        <li data-target="#myCarousel" data-slide-to="{$key}" class="active"></li>
                                        {/loop}
                                    </ol>
                                </div>
                            </div>
                        </div>
                        <div class="col-md-8">
                            <div class="portlet light" style="height: 245px;">
                                <div class="portlet-title ">
                                    <div class="row">
                                        <div class="col-md-12">
                                            <h4><a class="title">迅睿CMS基于CI4框架开发的PHP7多种终端建站程序</a></h4>
                                        </div>
                                    </div>
                                </div>
                                <div class="portlet-body">
                                    <div class="row">
                                        <div class="col-md-6">
                                            <ul class="list-unstyled">
                                                <!--调用新闻模块的最新7条-->
                                                {module module=news order=updatetime num=7}
                                                <li style="line-height: 23px"><span class="badge badge-empty badge-success"></span>&nbsp;<a href="{$t.url}" class="title">{dr_strcut($t.title, 20)}</a></li>
                                                {/module}
                                            </ul>
                                        </div>
                                        <div class="col-md-6">
                                            <ul class="list-unstyled">
                                                <!--调用新闻模块的最新从7开始数的7条-->
                                                {module module=news order=updatetime num=7,7}
                                                <li style="line-height: 23px"><span class="badge badge-empty badge-success"></span>&nbsp;<a href="{$t.url}" class="title">{dr_strcut($t.title, 20)}</a></li>
                                                {/module}
                                            </ul>
                                        </div>
                                    </div>
                                </div>
                            </div>

                        </div>
                    </div>


                    <!-- 调用新闻模块 -->
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="portlet light">
                                <div class="portlet-title">
                                    <div class="caption">
                                        <span class="caption-subject bold uppercase"> 新闻模块</span>
                                    </div>
                                </div>
                                <div class="portlet-body">
                                    <div class="row">
                                        <div class="col-lg-7">
                                            <div class="row">
                                                <div class="col-md-6">
                                                    <ul class="list-unstyled fc-list-row">
                                                        <!-- 调用新闻模块的最新10条数据 -->
                                                        {module module=news order=updatetime num=9}
                                                        <li><span class="badge badge-empty badge-success"></span>&nbsp;<a href="{$t.url}" class="title">{dr_strcut($t.title, 20)}</a></li>
                                                        {/module}
                                                    </ul>
                                                </div>
                                                <div class="col-md-6">
                                                    <ul class="list-unstyled fc-list-row">
                                                        <!-- 调用新闻模块浏览量最高的数据 -->
                                                        {module module=news order=hits num=9}
                                                        <li><span class="badge badge-empty badge-success"></span>&nbsp;<a href="{$t.url}" class="title">{dr_strcut($t.title, 20)}</a></li>
                                                        {/module}
                                                    </ul>
                                                </div>
                                            </div>

                                        </div>
                                        <div class="col-lg-5">
                                            <div class="row">
                                                <!-- 调用新闻模块带“图片”的数据 -->
                                                {module thumb=1 module=news order=updatetime num=6}
                                                <div class="col-sm-4 fc-list-image">
                                                    <div class="tile-container">
                                                        <div class="tile-thumbnail">
                                                            <a href="{$t.url}" ><img src="{dr_thumb($t.thumb, 120, 75)}" height="75"></a>
                                                        </div>
                                                        <div class="tile-title">
                                                            <h5><a href="{$t.url}" class="title">{dr_strcut($t.title, 7)}</a></h5>
                                                        </div>
                                                    </div>
                                                </div>
                                                {/module}
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 瀑布流调用 -->
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="portlet light">
                                <div class="portlet-title">
                                    <div class="caption">
                                        <span class="caption-subject bold uppercase"> 滚动调用示例</span>
                                    </div>
                                </div>
                                <div class="portlet-body search-page search-content-1">

                                    <div class="search-container">
                                    <ul class="search-container" id="content_list">
                                        {template "index_data.html"}
                                    </ul>


                                </div>
                                </div>
                            </div>
                        </div>
                    </div>




                </div>
            </div>
        </div>
    </div>
</div>

<script>
    var Mpage=1;

    //滚动显示更多
    var scroll_get = true;  //做个标志,不要反反复复的加载
    $(document).ready(function () {
        $(window).scroll(function () {
            if (scroll_get==true &&  (400 + $(window).scrollTop())>($(document).height() - $(window).height())) {
                scroll_get = false;
                layer.msg('内容加截中,请稍候',{time:1000});
                dr_ajax_load_more();
            }
        });
    });

    function dr_ajax_load_more(){
        Mpage++;
        $.get('/index.php?s=api&c=api&m=template&name=index_data.html&format=json&page='+Mpage+'&'+Math.random(),function(res){
            $('.footer-cont').hide();
            if(res.code==1){
                if (res.msg.indexOf("</li>") != -1) {
                    $('#content_list').append(res.msg);
                    scroll_get = true;
                } else {
                    layer.msg("已经显示完了",{time:500});
                }
            }else{
                layer.msg(res.msg,{time:2500});
            }
        }, 'json');
    }

    (function(){
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        }
        else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

{template "footer.html"}